// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#pragma once

#include "fastflow/core/common.h"
#include "fastflow/graph/graph.h"
#include "fastflow/framework/op_kernel.h"

namespace fastflow {

class ExecutionProviders;
class KernelRegistryManager;

class GraphPartitioner {
 public:
  //The order of providers represents the user preference.
  GraphPartitioner(KernelRegistryManager& kernel_registry_mgr,
                   const ExecutionProviders& providers)
      : kernel_registry_mgr_(kernel_registry_mgr),
        providers_(providers) {}

  Status Partition(fastflow::Graph& graph) const;

 private:
  FASTFLOW_DISALLOW_COPY_ASSIGNMENT_AND_MOVE(GraphPartitioner);

  KernelRegistryManager& kernel_registry_mgr_;
  const ExecutionProviders& providers_;
};
}  // namespace fastflow
